<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.io.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:url var="baseUrl" value="/"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Welcome</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"/>
    <style type="text/css">
    * {font-family:"Times New Roman", "Arial"}
    body {margin:0;padding:0;}
    .title {font-size:30px;font-weight:bold;padding:5px 0 5px 30px;color:white;background-color:black;}
    </style>
  </head>
  
  <body>
    <div class="title">Struts 2 &amp; ExtJS 3.4 Personal Samples</div>
    <%
    String path = request.getSession().getServletContext().getRealPath("/html/");
    File root = new File(path);
    File[] files = root.listFiles();
    out.write("<ul>");
    for (File file : files) {
        if (file.isFile()) {
            out.write("<li>");
            out.write("<a href='html/" + file.getName() + "' target='_blank'>" + file.getName() + "</a>");
            out.write("</li>");
        }
    }
    out.write("</ul>");
    %>
    <ul>
        <li><a href="${baseUrl}atmt/swfupload.do" target="_blank">SWFUploadDialog.jsp</a></li>
    </ul>
  </body>
</html>
